package com.cy.zs.hp.feign.service;


import com.cy.zs.hp.feign.service.impl.PatientServiceFB;
import com.cy.zs.hp.model.HisPatient;
import com.cy.zs.hp.model.HisRegister;
import com.cy.zs.web.util.JsonResult;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.validation.Valid;
import java.util.List;

@FeignClient(name = "hp-patient", fallback = PatientServiceFB.class)
public interface IHisRegisterFeignService {
    @GetMapping("/hp/hisRegister/{doctorId}/{patientId}")
    JsonResult<List<HisRegister>> findByDoctorId(@PathVariable String doctorId,@PathVariable  String patientId);

    @RequestMapping("/hp/hisPatient/doAddPatient")
    JsonResult<List<HisPatient>> doAddPatient(@Valid HisPatient hisPatient);//插入候诊者
    @RequestMapping("/hp/hisRegister/doAddRegister")
    JsonResult doAddRegister(@Valid HisRegister hisRegister);//添加预约表
}
